package com.it.jiang.Controller;

import com.alibaba.fastjson.JSONObject;
import com.it.jiang.Service.UserBaseService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserBaseService userBaseService;

    @RequestMapping(value = "/usertest", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
    public void usertest(){
        JSONObject jsonObject = new JSONObject();
        userBaseService.mp();
        jsonObject.put("调用mp的方法成功","666");
    }

    @RequestMapping(value = "/jsontest", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
    public JSONObject jsontest(){

       return   userBaseService.jsontest();

    }
}
